<meta charset="UTF-8">
<?php
//连接数据库
require ('../Common/dbConn.php');
connect();
//取登录页表单数据
$adminname=$_POST["adminname"];
$password=$_POST["password"];

$sql="select * from admins where adminname='$adminname' and password='$password' ";
$rs=mysql_query($sql);
$num=mysql_num_rows($rs);
if ($num>0) {
    session_start();//启动session
    $_SESSION["adminname"]=$adminname; //将管理员用户名写入session
    header("location:../User Management/ht_index.php");
}else
{   echo "登录失败！1秒后将返回登录页<br/>";
    header("refresh:1;url='ht_login.php'");
}
?>
